<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/order.css?v=<?php echo Yii::app()->params['version']['CSS'];?>"/>
<div class="cont">
	<?php $this->beginWidget('application.widget.tools.process', array('step'=>2)); ?>
	<?php $this->endWidget(); ?>
    <div class="order_info">
    	<h2>您的订单信息 :</h2>
        <table border="0" cellspacing="0" cellpadding="0">
			<?php foreach($orderDetail as $key=>$value){?>
          <tr>
            <td width="450"><a href=""><?php echo $value['goods_name'];?></a></td>
            <td width="120">成人<?php echo $value['sell_num'];?>人</td>
            <td width="190"><?php echo date("Y年m月d日", strtotime($value['raw_add_time']));?></td>
            <td><strong>￥ <?php echo $value['total_price'];?></strong></td>
          </tr>
			<?php }?>
        </table>
        <div class="rate">
        	<div class="btn_show open">查看全部<i></i></div>
        	<p><span>总计：<i>￥</i></span><strong><?php echo $mainOrder['total_amount']?></strong></p>
        </div>
    </div>
    <div class="order_pay">
    	<h2>支付订单</h2>
        <ul class="pay_nav">
        	<li class="cur"><i></i>在线支付</li>
        	<!--<li><i></i>银行汇款</li>-->
        </ul>
        <ul class="pay_ico" style="display:block;">
        	<li class="select">
            	<img src="../../images/order/pay_ico_1.jpg?v=<?php echo Yii::app()->params['version']['IMG'];?>" alt="" />
                <span></span>
                <i></i>
            </li>
        	<!--<li>
            	<img src="../../images/order/pay_ico_2.jpg?v=<?php echo Yii::app()->params['version']['IMG'];?>" alt="" />
                <span></span>
                <i></i>
            </li>-->
        </ul>
        <ul class="pay_ico">
        	<li>
            	<img src="../../images/order/pay_ico_2.jpg?v=<?php echo Yii::app()->params['version']['IMG'];?>" alt="" />
                <span></span>
                <i></i>
            </li>
        	<li>
            	<img src="../../images/order/pay_ico_1.jpg?v=<?php echo Yii::app()->params['version']['IMG'];?>" alt="" />
                <span></span>
                <i></i>
            </li>
        </ul>
        <p class="rate"><span>共计支付金额：<i>￥</i></span><strong> <?php echo $mainOrder['total_amount']?></strong></p>
        <a href="javascript:;" class="buy">立即预定</a>
    </div>
</div>
<script type="text/javascript">
new tabChange({tab:$(".order_pay .pay_nav li"),con:$(".order_pay .pay_ico"),current:"cur",mouseEvent:"click"});
new btnFocus({btn:$(".order_pay .pay_ico li"),current:"select"});

var $form = $(".order_info table tr:gt(2)");
var $btnShow = $(".order_info .rate .btn_show");
var size = $form.size();

$form.hide();
$btnShow.click(function(){
	$form.toggle();
	$(this).toggleClass("open");
});
$(".buy").on("click", function(){
	location.href = "<?php echo Yii::app()->createUrl('payment/index', array('ordersn'=>$mainOrder['order_sn']))?>";
});
</script>